package sfms.model;


public class Venue implements Comparable<Venue> {
    
    public Venue() {
    }

    public Venue(int id, String title, int capacity, Facility facility) {
        this.id = id;
        this.title = title;
        this.capacity = capacity;
        this.facility = facility;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getCapacity() {
        return capacity;
    }

    public void setCapacity(int capacity) {
        this.capacity = capacity;
    }

    public Facility getFacility() {
        return facility;
    }

    public void setFacility(Facility facility) {
        this.facility = facility;
    }
    
    public String getData() {
        return id + ", " + title + ", " + capacity + ", " + facility.getData();
    }
    
    @Override
    public String toString() {
        return title;
    }
    
    @Override
    public int compareTo(Venue t) {
        if (id == t.id) {
            return 0;
        }
        
        return (id < t.id ? -1 : 1);
    }
    
    private int id;
    private String title;
    private int capacity;
    private Facility facility;
}
